package de.chrisbremer.hydromap;

/**
 * @author 	chris
 * @date   	2011-12-23
 */

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;

public class GPSLocationListener implements LocationListener{
	
	String mLat;
	String mLon;
	String mHeight;
	GpsData mGpdata = null;
	Boolean mStatus = false;
	
	public void onLocationChanged(Location loc)
	{
		mLat = Double.valueOf(loc.getLatitude()).toString();
		mLon = Double.valueOf(loc.getLongitude()).toString();
	}
	
	public String getLat()
	{
		return mLat;
	}
	public String getLon()
	{
		return mLon;
	}
	public String getHeight()
	{
		return mHeight;
	}

	public void onProviderDisabled(String provider)
	{
		mStatus = false;
	}

	public void onProviderEnabled(String provider)
	{
		mStatus = true;
	}

	
	public GpsData localLocation()
	{
		return new GpsData(5000, mLat, mLon, mHeight);
	}


//	@Override
	public void onStatusChanged(String provider, int status, Bundle extras)
	{

	}

}

